﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<script src="~/Content/js/CreateControl.js" type="text/javascript"></script>
<style>
    td, th {
        padding: 13px;
    }
</style>
<script type="text/javascript">
    $(function () {
        debugger;
        var Report = ReportViewer.Report;
        // Report.LoadFromURL("../../../../ReportTemplate/出院患者列表.grf");
        GetDate();
    }
        );

    function GetDate() {
        var nowdays = new Date();
        var year = nowdays.getFullYear();
        var month = nowdays.getMonth();
        if (month == 0) {
            month = 12;
            year = year - 1;
        }
        if (month < 10) {
            month = "0" + month;
        }
        var firstDay = year + "-" + month + "-" + "01" + " 00:00:00";//上个月的第一天

        $("#ryrq").val(firstDay);

        var myDate = new Date(year, month, 0);
        var lastDay = year + "-" + month + "-" + myDate.getDate() + " 23:59:59";//上个月的最后一天
        $("#cyrq").val(lastDay);
    }
</script>
<form id="form1" class="form">
    <table style="width:95%">
        <tr>
            <td>入院日期:</td>
            <td class="formValue">
                <input id="ryrq" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' })" />
            </td>
            <td class="formValue"><input id="cyrq" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' })" /></td>
            <td>排序列:</td>
            <td class="formValue">
                <select id="px" class="form-control">
                    <option value="">==请选择==</option>
                    <option value="0">出院日期</option>
                    <option value="1">住院号</option>
                    <option value="2">病人类型</option>
                    <option value="3">姓名</option>
                    <option value="4">出生日期</option>
                </select>
            </td>
            <td class="formValue">
                <select id="sj" class="form-control">
                    <option value="">==请选择==</option>
                    <option value="0">升序</option>
                    <option value="1">降序</option>
                </select>
            </td>
        </tr>
    </table>
</form>
<p>
    <script type="text/javascript">
        CreatePrintViewerEx("100%", "500", "", "", false, "<param name=BorderStyle value=1>");
    </script>
</p>
